<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-on基础</title>
</head>
<body>
    <div id="app">
        <input type="button" value="v-on指令" v-on:click="gotoLOL">
        <input type="button" value="v-on简写" @click="gotoLOL">
        <input type="button" value="双击事件" @dblclick="gotoLOL">
        <h2 @click="changeDemo">{{demo}}</h2>
    </div>
    <script src="static/vue.js"></script>
    <script>
        var vue = new Vue({
            el:"#app",
            data:{
                demo:"demo"
            },
            methods:{
                gotoLOL:function(){
                    console.log("lg"),
                    alert("lg")
                },
                changeDemo:function(){
                    console.log(this.demo)
                    this.demo+="!lg!"
                }
            }
        })
    </script>
</body>
</html>